package com.ruoyi.awards.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.awards.mapper.JwCompetitionAwardsMapper;
import com.ruoyi.awards.domain.JwCompetitionAwards;
import com.ruoyi.awards.service.IJwCompetitionAwardsService;

/**
 * 竞赛获奖情况Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-11-13
 */
@Service
public class JwCompetitionAwardsServiceImpl implements IJwCompetitionAwardsService 
{
    @Autowired
    private JwCompetitionAwardsMapper jwCompetitionAwardsMapper;

    /**
     * 查询竞赛获奖情况
     * 
     * @param caId 竞赛获奖情况主键
     * @return 竞赛获奖情况
     */
    @Override
    public JwCompetitionAwards selectJwCompetitionAwardsByCaId(Long caId)
    {
        return jwCompetitionAwardsMapper.selectJwCompetitionAwardsByCaId(caId);
    }

    /**
     * 查询竞赛获奖情况列表
     * 
     * @param jwCompetitionAwards 竞赛获奖情况
     * @return 竞赛获奖情况
     */
    @Override
    public List<JwCompetitionAwards> selectJwCompetitionAwardsList(JwCompetitionAwards jwCompetitionAwards)
    {
        return jwCompetitionAwardsMapper.selectJwCompetitionAwardsList(jwCompetitionAwards);
    }
    
    /**
     * 查询竞赛获奖情况列表
     * 
     * @param jwCompetitionAwards 竞赛获奖情况
     * @return 竞赛获奖情况
     */
    @Override
    public List<JwCompetitionAwards> selectAllJwCompetitionAwards(JwCompetitionAwards jwCompetitionAwards) {
        return jwCompetitionAwardsMapper.selectAllJwCompetitionAwards(jwCompetitionAwards);
    }

    /**
     * 新增竞赛获奖情况
     * 
     * @param jwCompetitionAwards 竞赛获奖情况
     * @return 结果
     */
    @Override
    public int insertJwCompetitionAwards(JwCompetitionAwards jwCompetitionAwards)
    {
        return jwCompetitionAwardsMapper.insertJwCompetitionAwards(jwCompetitionAwards);
    }

    /**
     * 修改竞赛获奖情况
     * 
     * @param jwCompetitionAwards 竞赛获奖情况
     * @return 结果
     */
    @Override
    public int updateJwCompetitionAwards(JwCompetitionAwards jwCompetitionAwards)
    {
        jwCompetitionAwards.setUpdateTime(DateUtils.getNowDate());
        return jwCompetitionAwardsMapper.updateJwCompetitionAwards(jwCompetitionAwards);
    }

    /**
     * 批量删除竞赛获奖情况
     * 
     * @param caIds 需要删除的竞赛获奖情况主键
     * @return 结果
     */
    @Override
    public int deleteJwCompetitionAwardsByCaIds(Long[] caIds)
    {
        return jwCompetitionAwardsMapper.deleteJwCompetitionAwardsByCaIds(caIds);
    }

    /**
     * 删除竞赛获奖情况信息
     * 
     * @param caId 竞赛获奖情况主键
     * @return 结果
     */
    @Override
    public int deleteJwCompetitionAwardsByCaId(Long caId)
    {
        return jwCompetitionAwardsMapper.deleteJwCompetitionAwardsByCaId(caId);
    }
}
